home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1990 May
/
1990-05.d64
/
custom cursor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
103 lines
5 rem copyright 1990 compute! publications, inc. - all rights reserved
6 poke53280,14:poke53281,6
10 sa=49152:rem starting address
20 gosub63000:clr
30 sa=peek(253)*256+peek(254):co=sa+3:cf=sa+6:rem define jump table addresses
40 dim sp(8):rem default speeds
50 restore
60 for a=0 to 8:read sp(a):next
70 data 0,2,3,5,9,255,3,3,3
80 cn=1:cc=16:s=sp(cn)
90 sys sa,cn,cc,s
100 print"[155][147]";
110 print" use:"
120 print" f1/2 - to change number"
130 print" f3/4 - to change color"
140 print" f5/6 - to change speed"
150 print" f7 - to view help"
160 print" f8 - to quit"
170 print" you may type any keys you wish: ";
180 gosub490
190 sys co,2:getg$:g=asc(g$)
200 if g<133 or g>141 then460
210 if g$<>"[133]" then230
220 cn=cn+1:goto250
230 if g$<>"[137]" then280
240 cn=cn-1
250 if cn>8 then cn=cn-9:goto250
260 if cn<0 then cn=cn+9:goto260
270 s=sp(cn):goto420
280 if g$<>"[134]" then300
290 cc=cc+1:goto320
300 if g$<>"[138]" then350
310 cc=cc-1
320 if cc>16 then cc=cc-17:goto320
330 if cc<0 then cc=cc+17:goto330
340 goto420
350 if g$="[135]" then s=s+1:goto400
360 if g$="[139]" then s=s-1:goto410
370 if g$="[136]" then100
380 if g$="[140]" then end
390 :
400 if s>255 then s=s-256:goto400
410 if s<0 then s=s+256:goto410
420 if cn=0 then sys sa,cn:goto440
430 sys sa,cn,cc,s
440 gosub490
450 goto190
460 printg$;
470 goto190
480 stop
490 rem print cursoring info
500 sys cf
510 poke783,1:sys65520:sc=peek(646):rem save current cursor position and color
520 print"[155]"tab(27)"cursor info-"
530 print tab(28)"number: ";
540 print right$(str$(cn),1)
550 print tab(29)"color: ";
560 print right$("0"+mid$(str$(cc),2),2)
570 print tab(29)"speed: ";
580 print right$("00"+mid$(str$(s),2),3)
590 poke783,0:sys65520:poke646,sc:rem restore cursor position and color
600 return
610 :
63000 a=peek(61)+peek(62)*256:poke66,int(a/256):poke65,a-peek(66)*256
63010 rem next line does a selective restore
63020 print"[147] please wait 5 seconds...reading data"
63030 nb=355
63040 if sa<>0 then63070
63050 e=peek(55)+peek(56)*256
63060 b=e-nb:goto63080
63070 b=sa:e=b+nb
63080 fora=btoe-1:readd%:ifd%>=0then63100
63090 l=d%+e:d%=l/256:d1%=l-d%*256:pokea,d1%:a=a+1
63100 pokea,d%:next
63110 a=b+127:poke b+12,a/256:poke b+31,a-int(a/256)*256
63120 print" completed"
63130 if sa<>0 then63150
63140 poke 55,b-int(b/256)*256:poke 56,b/256
63150 poke 253,b/256:poke 254,b-peek(253)*256
63160 return
63170 :
63180 data 76,-344,76,-150,76,-132,49,234,160,192,204,21,3,240
63190 data 26,174,20,3,142,-346,174,21,3,142,-345,162,127,56,120
63200 data 142,20,3,140,21,3,88,176,1,96,32,-243,224,1,176,8
63210 data 174,-346,172,-345,144,230,224,9,144,5,162,14,76,55,164
63220 data 202,138,10,168,185,-111,141,-189,185,-110,141,-188
63230 data 189,-95,141,-216,169,0,141,-192,32,-243,224,17,176
63240 data 217,142,-165,32,-243,142,-216,96,32,121,0,208,3,104
63250 data 104,96,32,155,183,96,76,97,234,32,234,255,165,204,208,246,198
63260 data 205,208,242,169,2,133,205,164,211,165,207,208,14,177,209,230,207
63270 data 133,206,32,36,234,177,243,141,135,2,162,0,232,189,-87,208
63280 data 4,162,0,240,247,142,-192,201,32,208,8,174,135,2,165,206
63290 data 76,94,234,162,16,224,16,144,3,174,134,2,201,160,208,240,76
63300 data 90,234,169,0,133,204,32,-243,138,240,7,165,198,240,252,202
63310 data 208,1,96,169,1,133,204,165,207,240,012,165,206,174,135,2,160
63320 data 0,132,207,32,19,234,96,-87,-54,-45,-36,-33
63330 data -31,-22,-5,2,3,5,9,255,3,3,3,99,119,120
63340 data 226,249,239,228,160,227,247,248,98,121,111,100,32,100,111,121,98
63350 data 248,247,227,160,228,239,249,226,120,119,99,32,0,124,225,108,98
63360 data 123,97,126,226,0,110,93,112,64,109,93,125,64,0,100,32,0
63370 data 160,0,226,95,225,233,98,223,97,105,0,99,69,68,64,70,82
63380 data 100,32,100,82,70,67,68,69,99,32,0,64,77,93,78,0